const exprress = require('express')
const router = exprress.Router()
const handler = require('../RouterHandler/chat')
/** 
 * 单聊
 * followList 关注列表
 * followAdd 添加关注
 * followCancel 取消关注
 * crowdEdit	修改群
 * followEdit 修改单人聊天信息
**/
router.post('/chat/followList', handler.followList)
router.post('/chat/followAdd', handler.followAdd)
router.post('/chat/followCancel', handler.followCancel)
router.post('/chat/crowdEdit', handler.crowdEdit)
router.post('/chat/followEdit', handler.followEdit)
/** 
 * 群聊
 * getCrowdList 关注列表
 * crowdDel 删除群
 * crowdAdd 加入群
 * crowdCreate 创建群
 * crowdLeave 退群
 * crowdMenberList 成员列表
**/
router.post('/chat/getCrowdInfo', handler.getCrowdInfo)
router.post('/chat/getCrowdList', handler.getCrowdList)
router.post('/chat/crowdDel', handler.crowdDel)
router.post('/chat/crowdAdd', handler.crowdAdd)
router.post('/chat/crowdCreate', handler.crowdCreate)
router.post('/chat/crowdLeave', handler.crowdLeave)
router.post('/chat/crowdMenberList', handler.crowdMenberList)
/**
  * 公用
  * getChatMsg 获取单聊消息
  * saveChatMsg 保存单聊消息
  * recallChatMsg 撤回单聊消息
**/
router.post('/chat/getChatMsg', handler.getChatMsg)
router.post('/chat/saveChatMsg', handler.saveChatMsg)
router.post('/chat/recallChatMsg', handler.recallChatMsg)
  
module.exports = router